<?php

namespace App\Http\Middleware;

use Closure;
use Session;

class Authuser
{
    //夜读书会员发布新书籍的中间件

    public function handle($request, Closure $next)
    {

        if (Session::has('name')) {
            return $next($request);
        }
        else {
            return redirect()->guest('uslogin');
        }

        //return $next($request);
    }
}
